const mongoose = require('mongoose');

var customerSchema = mongoose.Schema({
    username: String,
    password: String,
    portrait: String,
    addresses: [{
        address:String,
        phone:String,
        receiver:String
    }],
    orderInfos: [{
        type: mongoose.Schema.Types.ObjectId,
        ref: 'orderInfo'
    }]
},{
    collection: 'customer'
});

var Customer = mongoose.model('Customer',customerSchema);
module.exports = Customer;

